Repository navigation
Check for the new direct invocation trace format and use that - #194
Merged
agocs merged 5 commits intoJun 21, 2021
Merged
Conversation
maxday
reviewed
Jun 21, 2021
| let traceData = null; | ||
|
|
||
| if ( | ||
| custom._datadog && |
Contributor
There was a problem hiding this comment.
maybe you could use .hasOwnProperty as well for _datadog ?
maxday
reviewed
Jun 21, 2021
| const custom = context.clientContext?.custom; | ||
|
|
||
| if (!traceData || typeof traceData !== "object") { | ||
| if (!custom || typeof custom !== "object") { |
Contributor
There was a problem hiding this comment.
maybe a test to validate this condition could be useful ?
Contributor
|
LGTM ! I left minor comments |
maxday
self-requested a review
June 21, 2021 19:59
maxday
approved these changes
Jun 21, 2021
agocs
deleted the
chris.agocs/new_direct_invocation_trace_propogation_format
branch
June 21, 2021 20:30
This was referenced Jul 12, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Updates datadog-lambda-python so it can extract trace contexts stored in context.client_context.custom using the new propagation format, described in this doc: https://docs.google.com/document/d/1pruSeesAr2bAVMtz_rUlsiBZKFoFWdB4nSq5Vuym2l8/edit#heading=h.ptr8uhqw5ht
Motivation
Storing a map containing trace context in context.client_context.custom._datadog causes compatibility issues with Go and Java lambda functions. C.f. aws/aws-lambda-java-libs#212. We're updating the trace propagation format to fix this issue.
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply